
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>角色${id==null?"添加":"修改"}</title>
</head>
<body>
  <form action="${pageContext.request.contextPath}/role_${id==null?"add":"edit"}" method="post">
        <input type="hidden" name="id" value="${id}">
        角色名称:<input type="text" name="name" value="${name}"><br>
        权限选择：
        <select name="rightIds" multiple>
            <s:iterator value="#rights">
                <option value="${id}" <s:if test="%{id in rightIds}">selected</s:if>>${name}</option>
            </s:iterator>
        </select>
        <button type="submit">提交</button>
  </form>
    <s:debug></s:debug>
</body>
</html>
